/**
 * Created by zhangqingxi on 2017-04-20.
 */
var modelPath=ROOT_PATH+'/environmental/solidWaste/outsourcingFee/';



//初始化危废类别
function initOutsourcingUnit() {
    $('#outsourcingUnitId').combobox({
        url:findOu,
        valueField:'id',
        textField:'text',
        required:true,
        editable:false,
        prompt:'请选择',
        panelHeight:'auto'
    });
}
function initSubmitButtonClick(url) {
    //表单提交
    $('#btn_solidWaste_outsourcingFee_save').on('click',function () {

        var index=layer.confirm('是否确定保存？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            $('#solidWaste_outsourcingFee_form').form('submit', {
                url: url,
                onSubmit: function (param) {
                    var isValid = $(this).form('validate');
                    if (!isValid) {
                        layer.close(index);
                        layer.msg("请正确填写表单")
                    }
                    return $(this).form('validate');
                },
                success: function (result) {
                    var data = $.parseJSON(result);
                    successCallback(data);
                }
            });
        });

    });
}
